Okay.
I'm going to quickly talk about the client server communication model and what it does in Roblox.
So in multiplayer games, you know, there are a bunch of players who are running the game on their
computers and you have all these players connected together by a server.
The same idea applies with roadblocks as each client runs the graphics and client sited code on their
computers.
Any updates to other players movements or anything happen in the server gets copied and downloaded to
your computer.
Basically, the game is replicating or copying from the server to your computer.
Now what this means is that you can perform things in this copy of the game on your computer that can't
be seen by the server or the players.
The only exception to this is control over your character, which automatically gets replicated from
your computer to the server and back to all the other clients.
So when you join a game and roadblocks, the server copies all the scripts and instances from replicated
storage replicated first the workspace starter player script sounds and gives to your game.
Anything stored in the server storage or server script service does not get copied to your game because
those are server related containers and you don't get access to them.
Now because Roblox runs on the idea that the server replicates stuff to your game.
How do we send information to the server?
Like when I press a button and a door should open for all the other players.
This is where remote events and remote functions come in.
A remote event is an event in your game that you can fire from the client to the server to pass on when
something happens from your copy of the game.
The servers job is to verify any information coming from your computer, your client, and once it's
been verified, then it can replicate those changes to all the other clients in the game.
The server can also send information using remote events to specific client or to all the clients for
a multitude of reasons.
Now, a remote function is when you send information to the server and then you yield the script until
the server sends information back to you.
Why would we want to do this?
Well, there may be cases where you need to enter a password or something and the server has to verify
whether or not the code you entered matches the correct one.
You don't want to store the code on the client because then exploiters can get access to the scripts
and read the password, which you never want.
So basically anything that the server does gets replicated to all the clients.
While anything a client does only gets shown in their copy of the game unless that client fires a remote
to the server, the server verifies the information and replicates it back to all the other clients.
This is the basic idea of client server communication.
I'll leave this article linked in case you'd like to read more about it.